package easy;

public class Solution_1486 {

    public int xorOperation(int n, int start) {
        int num = start;
        for (int i = 1; i < n; i++) {
            num = num ^ (start + (i<<1));
        }
        return num;
    }

    public static void main(String[] args) {
        Solution_1486 model = new Solution_1486();
        System.out.println(model.xorOperation(5, 0));
        System.out.println(model.xorOperation(4, 3));
        System.out.println(model.xorOperation(1, 7));
        System.out.println(model.xorOperation(10, 5));
    }
}
